package me.caofeng.service.api;

import me.caofeng.enums.CheckStatus;
import me.caofeng.pojo.CartItem;
import me.caofeng.pojo.Carts;
import me.caofeng.pojo.Response;
import me.caofeng.pojo.User;

/**
 * Copyright © 2017曹峰. All rights reserved.
 *
 * @Prject: mall
 * @Package: me.caofeng.service.api
 * @Description:
 * @Author: 曹峰 blog.caofeng.me
 * @Date: 2017-06-25 17:00
 * @Version: V1.0
 */
public interface ICartService {
    Response<CartItem> addItemToCart(Integer productId, Integer count, String userId);

    Response<Carts> getCarts(String userId);

    Response<Carts> updateItemCount(Integer cartItemId ,Integer count ,String userId);

    Response<Carts> deleteCartItem(Integer cartItemId, String userId);

    Response<Carts> updateCartItemCheckStatus(Integer cartItemId, CheckStatus status,String userId);

    Response<Carts> updateCartsStatus(String uid,CheckStatus status);

    /**
     * @Author:曹峰 blog.caofeng.me
     * @Date: 2017/7/3 12:04
     * @Description: 清空购物车
     * @param userId 用户id
    */
    Response clearCart(String userId);
}
